package org.xxpay.pay.channel.qianhuitong;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.Assert;
import org.xxpay.common.unify.AbstractPaymentConfig;

public class QianhuitongConfig extends AbstractPaymentConfig {
    public static final String CHANNEL_NAME = "qianhuitong";
    public static final String pay_url_fixx = "/Pay";


    public static final String RESPONSE_RESULT_FAIL = "fail";
    public static final String RETURN_VALUE_SUCCESS = "1";
    public static final String RESPONSE_RESULT_OK = "SUCCESS"; // 返回上游成功
    QianhuitongConfig(String payParam){
        Assert.notNull(payParam, "init sft config error");
        JSONObject object = JSON.parseObject(payParam);
        setAppId(object.getString("appId"));
        setPrivateKey(object.getString("privateKey"));
        setRequestUrl(object.getString("requestUrl"));
        setPayMode(object.getString("payType"));
    }
}